Conversation
…liance (#324) Validates all static products in seller_agent.py against the local AdCP 3.0.1 schema cache via the Python jsonschema validator, anchoring the Python-side verdict that the CI divergence is in @adcp/client's Ajv oneOf error reporter rather than in the response shape we emit. https://claude.ai/code/session_019rDGvdv7HHDKwJeNri9Lff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #324
Summary
Issue #324 reports that
@adcp/client@5.21.1's Ajv oneOf validator falsely flags products 2–5 inseller_agent.pyas missing required properties (name,description,publisher_properties, etc.) — fields that are clearly present in the dumped CI response. The Python jsonschema validator confirms all six static products are 3.0.1 spec-compliant; the failures are in the npm-side error reporter, not in the shape we emit.This PR adds a regression test that anchors that Python-side verdict and guardrails future PRODUCTS additions.
What's in this PR
tests/test_seller_agent_products_schema.py— 7 test cases:test_full_products_list_passes_response_validation— validates all 6 products as a batch (catches array-level constraints)test_individual_product_passes_response_validation[]— parametrized per product, so a failing product ID appears directly in the pytest node nameBoth tests guard against
outcome.variant == "skipped"(the silent-pass case whenschemas/cache/is absent)._PRODUCTSis acopy.deepcopysnapshot at collection time, guarding againstseed_pricing_option()mutating per-dictpricing_optionscontents if an integration test runs in the same process.What was tested
pytest tests/test_seller_agent_products_schema.py -v— 7 passed (initial + fixup pass)ruff check tests/test_seller_agent_products_schema.py— cleanmypy tests/test_seller_agent_products_schema.py --ignore-missing-imports— cleanPre-PR review (initial)
variant != "skipped"guard,list()copy); both fixed; round-2 pass found no new blockers, 1 nit (shallow copy leaves per-dict pricing_options mutable)reprvsformat_issues(), shallow vs deep copy. None blockers.Fixup commit — nits addressed (re-trigger via
/triage executeon #324)Three nits from the initial review were addressed in a follow-up commit:
validate_response+format_issuesfrom publicadcp.validation(not internalschema_validatorsubmodule)format_issues(outcome.issues)in assert messages for actionable CI outputcopy.deepcopy(...)instead oflist(...)to guard per-dict contentsFixup pre-PR review:
protocols/are out of scopeSession: https://claude.ai/code/session_01XcYd2AQ7o5h5SP2HEpbcXL